#ifndef _ROBOT_PACOHEAD_CCAMCLIENT_H_
#define _ROBOT_PACOHEAD_CCAMCLIENT_H_

#include <buola/image.h>
#include <robot/robot.h>
#include <buola/image/algorithm/calibration.h>
#include <blackbox/bbox.h>
#include <blackbox/proxies.h>
#include <blackbox/cdatain.h>
#include <robot/pacohead/enums.h>

namespace buola { namespace robot { namespace pacohead {

using namespace buola;

class CCamClient : public blackbox::BBox
{
public:
    CCamClient();
    ~CCamClient();

    void Init(const blackbox::CClientProxy &pClient=blackbox::CClientProxy("bbcam"));

    bool IsNextFrameReady(ECam pCams=CAM_ALL);
    void WaitNextFrame(ECam pCams=CAM_ALL);
    img::CImage_rgb8 GetCurrentImage(ECam pCam);
    const img::CCameraParameters &GetIntrinsicParameters(ECam pCam);

private:
    blackbox::CDataIn<img::CImage_rgb8> iFL,iFR,iWL,iWR;
    img::CCameraParameters mParameters[4];
};

/*namespace pacohead*/ } /*namespace robot*/ } /*namespace buola*/ }

#endif
